﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Areas/Manage/Views/Shared/Site.Master" Inherits="System.Web.Mvc.ViewPage<QianBuo.Lottery.Web.Areas.Manage.Models.ChaseTaskModels.IndexModel>" %>
<%@ Import Namespace="Code.Models" %>
<asp:Content ID="Content1" ContentPlaceHolderID="TitleContent" runat="server">
	追号明细
</asp:Content>

<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">
    <div>
        <% Html.DisableClientValidation(); %>
        <% Html.BeginForm(new { ID = "ChaseTaskSerchForm"},null); %>
        <%if (Request["ReturnUrl"] != null){%>
        <a class="a_blue" href='<%=Request["ReturnUrl"] %>'>&gt;&gt;返回</a>
        <%} %>
        <table class="table" width="100%">
            <tr class="th">
                <th colspan="5" align="left">
                    查找条件
                </th>
            </tr>
            <tr>
                <td>
                    彩种：<%=Html.DropDownListFor(p=>p.Serch.LotteryType,Model.Lotterys.Each(p=>p.Selected=Model.Serch.LotteryType.ToString()==p.Value)) %>
                </td>
                <td>
                    元角模式：<%=Html.DropDownListFor(p=>p.Serch.Ratio,Model.Ratios.Each(p=>p.Selected=Model.Serch.Ratio.ToString()==p.Value)) %>
                </td>
                <td>
                    奖金模式：<%=Html.DropDownListFor(p=>p.Serch.WinModel,Model.WinModels.Each(p=>p.Selected=Model.Serch.WinModel.ToString()==p.Value)) %>
                </td>
                <td>
                    状态：<%=Html.DropDownListFor(p=>p.Serch.State,Model.States.Each(p=>p.Selected=Model.Serch.State.ToString()==p.Value)) %>
                </td>
                <td rowspan="2">
                    <input type="submit" value="查找" />
                </td>
            </tr>
            <tr>
                <td>
                    用户：<%=Html.TextBoxFor(p => p.Serch.UserName, new { @class = "text100" }) %>
                </td>
                <td>
                    时间：<%=Html.TextBoxFor(p => p.Serch.StartTime, new { @class = "text80", onclick = "WdatePicker()" })%>
                </td>
                <td>
                    至：<%=Html.TextBoxFor(p => p.Serch.EndTime, new { @class = "text80", onclick = "WdatePicker()" })%>
                </td>
                <td>
                    中奖后中止：<%=Html.DropDownListFor(p=>p.Serch.StopWin,Model.StopWins.Each(p=>p.Selected=Model.Serch.StopWin.ToString()==p.Value)) %>
                </td>
            </tr>
            <%if(!ViewData.ModelState.IsValid) {%>
            <tr>
                <td colspan="5">
                    <%=Html.ValidationSummary() %>
                </td>
            </tr>
            <%} %>
        </table>
        <%=Html.HiddenFor(p=>p.PageSize) %>
        <% Html.EndForm(); %>
        <p />
        <table width="100%" class="table" id="chasetask_table">
            <tr class="th">
                <th>用户</th><th>日期</th><th>彩种</th><th>元角</th><th>奖金</th><th>中奖中止</th><th>任务金额</th>
                <th>追号期数</th><th>执行期数</th><th>撤销期数</th><th>状态</th><th>操作</th>
            </tr>
            <% if(Model.Tasks!=null){ foreach (var item in Model.Tasks)%>
            <% {%>
            <tr id="<%=item.ID %>" class="context_menu">
                <td id="UserName">
                    <%=item.UserName %>
                </td>
                <td id="AddTime" time='<%=item.AddTime.ToString("yyyy-MM-dd") %>'>
                    <%=item.AddTime.ToString("MM-dd HH:mm:ss") %>
                </td>
                <td id="LotteryType">
                    <%=item.LotteryType.GetName() %>
                </td>
                <td id="Ratio">
                    <%=item.RatioName %>
                </td>
                <td id="WinModel">
                    <%=item.WinModelName %>
                </td>
                <td><%=item.StopWin >= 0 ? "是" : "否"%></td>
                <td align="right">
                    <%=item.TaskMoney.ToString("F") %>
                </td>
                <td align="right">
                    <%=item.ChaseCount %>
                </td>
                <td align="right">
                    <%=item.ExecuteCount %>
                </td>
                <td id="State">
                    <%=item.CancleCount %>
                </td>
                <td>
                    <%=item.State.GetName() %>
                </td>
                <td>
                    <%=Html.ActionLink("详情", "Detail", Url.Route(new { ID = item.ID.ToString("N"), Model.Serch, Model.Page, Model.PageSize, ReturnUrl = Request["returnurl"], act = Request["act"], cont = Request["cont"], arst = Request["arst"] }), Url.Route(new { @class = "a_blue" }))%>
                </td>
            </tr>
            <% } %>
            <tr class="sumtr">
                <td><font color="red">合计</font></td>
                <td>&nbsp;</td>
                <td>&nbsp;</td>
                <td>&nbsp;</td>
                <td>&nbsp;</td>
                <td>&nbsp;</td>
                <td align="right">
                    <font color="red"><%=Model.SumTask.TaskMoney.ToString("F") %></font>
                </td>
                <td align="right">
                    <font color="red"><%=Model.SumTask.ChaseCount%></font>
                </td>
                <td align="right">
                    <font color="red"><%=Model.SumTask.ExecuteCount%></font>
                </td>
                <td>
                    <font color="red"><%=Model.SumTask.CancleCount%></font>
                </td>
                <td>&nbsp;</td>
                <td>&nbsp;</td>
            </tr>
            <tr>
                <td colspan="11">
                    <%=Html.Pager(Model.Page, Model.PageSize, Model.SumCount, "Page", Url.Route(new { Model.Serch, Model.PageSize, ReturnUrl = Request["ReturnUrl"], act = Request["act"] , cont = Request["cont"] , arst = Request["arst"] }), "PageSize")%>
                </td>
            </tr>
            <% }else{ %>
            <tr>
                <td colspan="12">
                    无记录！
                </td>
            </tr>
            <%} %>
        </table>
    </div>
</asp:Content>

<asp:Content ID="Content3" ContentPlaceHolderID="StyleAndScript" runat="server">
</asp:Content>
